home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1996 September
/
64er_Magazin_96-09_1996_Markt__Technik_de_Side_A.d64
/
a.g.e. _main
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
37KB
|
359 lines
5 print"[147]":sys16384:poke53280,peek(36357)
6 poke53281,0:x0=23:y0=7:bc=0:br=32:f4=8:v=48:x3=39:y3=14:p=3:dl=1
7 x1=11:y1=17:p=0:mp(0)=25:mp(1)=28:mp(2)=30:mp(3)=32:mp(4)=35:mp(5)=37:_floppy
10 rem screenaufbau
15 _at15,0:print"[159]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@";
29 f1=peek(36352):pp=36976
30 _farbset:_fout:v=peek(36848)
40 _gosub212:br=bc:_tmask1,2:_smask2,br:gosub1181:_cfree
50 poke53265,peek(53265)or16
197 rem ******************************
198 rem **** tastaturabfrage oben ****
199 rem ******************************
200 _sprset0,y0,x0:_cfree:_invbr:_tasto:a=peek(2):_gosub211+10*a:goto200
210 rem * cursor runter
211 y0=y0+1:ify0=15theny0=0
212 _hbcy0,x0:bc=peek(2):_decodbc:_tmask0,1:_smask1,bc:return
220 rem * cursor rechts
221 x0=x0+1:ifx0=40thenx0=0
222 _hbcy0,x0:bc=peek(2):_decodbc:_tmask0,1:_smask1,bc:return
230 rem * cursor hoch
231 y0=y0-1:ify0=-1theny0=14
232 _hbcy0,x0:bc=peek(2):_decodbc:_tmask0,1:_smask1,bc:return
240 rem * cursor links
241 x0=x0-1:ifx0=-1thenx0=39
242 _hbcy0,x0:bc=peek(2):_decodbc:_tmask0,1:_smask1,bc:return
250 rem * space
251 _hbcy0,x0:bc=peek(2):ifbc=32then:_cfree:a=peek(2):ifa=0thenreturn
252 if bc=32then:_nfree:bc=peek(2):_decodbc:_tmask0,1:_smask1,bc:poke32512+bc,15
253 if bc=32then:_sbc y0,x0,bc
254 br=bc:_tmask1,2:_smask2,br:_farbset
255 _sprset0,10,41:_sprset4,y0,x0:poke34816+y0*40+x0,br:gosub1000:_sprset4,10,41
256 _checkbr:gosub212:return
260 rem * return
261 ifpeek(32512+br)=255thenreturn
262 _hbcy0,x0:bh=peek(2):_scrmem0:gosub401:_sbcy0,x0,br:_hbcy0,x0:bc=peek(2)
263 _decodbc:_tmask0,1:_smask1,bc:_farbset:_sprset1,10,41:return
270 rem * undo _
271 x2=0:y2=0:x3=40:y3=15:_sprset2,1,41:_sprset3,1,41:c0=0:c1=0
275 _memscr0:_farbset:goto242
280 rem * a kopie oben rechts
281 x2=x0:y2=y0:if x2<>x3 or y2<>y3 then283
282 x2=0:y2=0:x3=41:y3=15:_sprset2,10,41:_sprset3,10,41:c0=0:c1=0:return
283 if x2<=x3 and y2<=y3 then:_sprset2,y2,x2:c1=1:return
285 x3=39:y3=14:_sprset2,y2,x2:_sprset3,10,41:c1=1:c0=0:return
290 rem * b kopie unten rechts
291 x3=x0:y3=y0:if x2<>x3 or y2<>y3 then293
292 x2=0:y2=0:x3=41:y3=15:_sprset2,10,41:_sprset3,10,41:c0=0:c1=0:return
293 if x2<=x3 and y2<=y3 then:_sprset3,y3,x3:c0=1:return
295 x2=0:y2=0:_sprset2,10,41:_sprset3,y3,x3:c0=1:c1=0:return
300 rem * c kopiere
301 ifc0=0 or c1=0 thenreturn
302 xc=x3-x2:yc=y3-y2:cf=0:xm=x0:ym=y0:ify0+yc> 14 then yc=14-y0:cf=1
303 ifx0+xc > 39 then xc=39-x0:cf=1
304 ifcf=1then:_sprset3,y2+yc,x2+xc:xn=x3:yn=y3:xm=x2:ym=y2
305 _sprset6,y0+yc,x0+xc:_tasto
306 a=peek(2):ifa<>9then:_sprset6,5,41:_sprset3,y3,x3:_gosub211+10*a:return
307 _scrmem0:_sprset6,4,41:_copyy2,x2,y2+yc,x2+xc:_bclry0,x0,y0+yc,x0+xc,32
308 _einfy0,x0,y0+yc,x0+xc:_farbset:gosub212:ifcf=0thenxn=x0+xc:yn=y0+yc
309 x2=xm:y2=ym:x3=xn:y3=yn:_sprset2,y2,x2:_sprset3,y3,x3:return
310 rem * f2
311 f1=f1+1:iff1=16thenf1=0
312 poke36352,f1:_farbset:_smask1,bc:_smask2,br:return
320 rem * f4
321 f2=f2+1:iff2=16thenf2=0
322 poke36353,f2:_farbset:_smask1,bc:_smask2,br:return
330 rem * f6
331 f3=f3+1:iff3=16thenf3=0
332 poke36354,f3:_farbset:_smask1,bc:_smask2,br:return
340 rem * f8
341 f4=peek(163)-25:poke32512+bc,f4:_farbset:_invbc:_smask1,bc:_smask2,br:return
350 rem * =
351 ifpeek(32512+br)=255thenreturn
352 _cleary0,x0:_sbcy0,x0,br:_farbset
353 _sprset1,10,41:goto 221
360 rem * screen in memory1
361 _scrmem1:return
370 rem * screen in memory2
371 _scrmem2:return
380 rem * momory1 in screen
381 _memscr1:_farbset:gosub212:return
390 rem * momory2 in screen
391 _memscr2:_farbset:gosub212:return
400 rem * loesche zeichen im bild
401 _scrmem0
402 _cleary0,x0:gosub212:return
410 rem * loesche zeichen im bild + ->
411 _cleary0,x0:gosub212:gosub221:_cfree:return
420 rem * menue aufrufen
421 _scrmem0:_sprset0,10,41:goto2000
430 rem * next char old mask
431 ifpeek(32512+br)=255thenreturn
432 _scrmem0:f=peek(32512+br):_cleary0,x0:_cfree:a=peek(2)
433 ifa=0then:_memscr0:return
434 _nfree:bc=peek(2):_tmask2,0
435 _codbc:_sbcy0,x0,bc:poke32512+bc,f:_farbset:gosub212:return
440 rem * aus ablage einfuegen
441 if c0=0 or c1=0 then return
443 _scrmem0:_bclry2,x2,y3,x3,bc:_farbset:_cfree:gosub212:return
450 rem * aktuelles zeichen blinkt
451 _blinkbc:return
460 rem * hilfseite aufschlagen *
461 gosub6030:return
470 rem * ^
471 ifpeek(32512+br)=255thenreturn
472 _cleary0,x0:_sbcy0,x0,br:_farbset
473 _sprset1,10,41:goto 231
480 rem * loesche zeichen im bild + ->
481 _cleary0,x0:gosub212:gosub231:_cfree:return
490 rem * rahmenfarbe erhoehen
491 b=peek(53280):b=b+1:ifb=256thenb=0
492 poke53280,b:return
997 rem ******************************
998 rem **** tastaturabfrage unten ***
999 rem ******************************
1000 _sprset1,y1,x1:_invbr:_tastu:a=peek(2):ifa<>4 then:_gosub1111+10*a:goto1000
1001 _sprset1,10,41:_tmask2,1:bc=br:_smask1,bc:return
1110 rem * cursor runter
1111 y1=y1+1:ye=ye+1:ifye=8theny1=y1-1:ye=7
1112 return
1120 rem * cursor rechts
1121 x1=x1+2:xe=xe+1:ifxe=4thenx1=x1-2:xe=3
1122 return
1130 rem * cursor hoch
1131 y1=y1-1:ye=ye-1:ifye=-1theny1=y1+1:ye=0
1132 return
1140 rem * cursor links
1141 x1=x1-2:xe=xe-1:ifxe=-1thenx1=x1+2:xe=0
1142 return
1160 rem * return
1161 poke36928+xe+ye*4,ff:_smask2,br:_tmask2,0:_codbr
1162 _farbset:return
1170 rem * _ undo
1171 _tmask1,2:_smask2,br:_farbset:_tmask2,0:_codbr:return
1180 rem * hintergrund gewaehlt
1181 _atff*2+18,22:print" ";:ff=0:_at18,22:print"[155]_";:return
1190 rem * multi 1 gewaehlt
1191 _atff*2+18,22:print" ";:ff=1:_at20,22:print"[155]_";:return
1200 rem * multi 2 gewaehlt
1201 _atff*2+18,22:print" ";:ff=2:_at22,22:print"[155]_";:return
1210 rem * inv gewaehlt
1211 _atff*2+18,22:print" ";:ff=3:_at24,22:print"[155]_";:return
1220 rem * f2
1221 gosub311:return
1230 rem * f4
1231 gosub321:return
1240 rem * f6
1241 gosub331:return
1250 rem * f8
1251 f4=peek(163)-26:poke32512+br,f4:_farbset:_invbr:_smask1,bc:_smask2,br
1252 _cfree:return
1260 rem * clr - fuelle mit ff
1261 forx=36928to36959:pokex,ff:nextx:_smask2,br:_tmask2,0:_codbr:return
1270 rem * vertikal spiegeln
1271 _tmask2,0:_vmir:_tmask2,0:_codbr:_smask2,br:return
1280 rem * horizontal spiegeln
1281 _tmask2,0:_hmir:_tmask2,0:_codbr:_smask2,br:return
1290 rem * tausche zwei farben
1291 _tmask2,0:fe=0
1292 gosub 1294:s1=fe:gosub1294:s2=fe:_fswaps1,s2:_tmask2,0:_codbr:_smask2,br
1293 _sprset1,y1,x1:return
1294 _sprset1,18+2*fe,20:_stop:a=peek(2)
1295 ifa=145thenfe=fe-1:iffe=-1thenfe=0
1296 ifa=17thenfe=fe+1:iffe=4thenfe=3
1297 ifa=13thenreturn
1298 goto1294
1300 rem * waagerechter strich *
1301 for a=0to3:poke36928+4*ye+a,ff:nexta:_smask2,br:_tmask2,0:_codbr:_farbset
1302 return
1310 rem * senkrechter strich *
1311 for a=0to7:poke36928+xe+a*4,ff:nexta:_smask2,br:_tmask2,0:_codbr:_farbset
1312 return
1320 rem * vertikal rotieren *
1321 _tmask2,0:_vrot:_tmask2,0:_codbr:_smask2,br:_farbset:return
1330 rem * horizontal rotieren *
1331 _tmask2,0:_hrot:_tmask2,0:_codbr:_smask2,br:_farbset:return
1340 rem * hilfsseite aufschlagen
1341 gosub6000:return
1350 rem * charblink *
1351 _blinkbr:return
1360 rem * in charset nach rechts +10 *
1361 _tmask2,0:_codbr
1362 br=br+10:ifbr>=256thenbr=255:_blinkbr
1363 _decodbr:_tmask0,2:_smask2,br:_farbset:_blinkbr:_tmask0,1:_smask1,br:return
1370 rem * in charset nach links -10 *
1371 _tmask2,0:_codbr
1372 br=br-10:ifbr<=69thenbr=70:_blinkbr
1373 _decodbr:_tmask0,2:_smask2,br:_farbset:_blinkbr:_tmask0,1:_smask1,br:return
1380 rem * zeichen manuell free
1381 _fmarkbr:_invbr:_cfree:return
1390 rem * antifree mode an oder aus
1391 _afmod:return
1400 rem * in charset nach rechts +1 *
1401 _tmask2,0:_codbr
1402 br=br+1:ifbr=256thenbr=255:_blinkbr
1403 _decodbr:_tmask0,2:_smask2,br:_farbset:_blinkbr:_tmask0,1:_smask1,br:return
1410 rem * in charset nach links -1 *
1411 _tmask2,0:_codbr
1412 br=br-1:ifbr=69thenbr=70:_blinkbr
1413 _decodbr:_tmask0,2:_smask2,br:_farbset:_blinkbr:_tmask0,1:_smask1,br:return
1420 rem * erhoehen die rahmenfarbe *
1421 a=peek(53280):a=a+1:ifa=256thena=0
1422 poke53280,a:return
1997 rem *****************************
1998 rem **** hauptmenue ****
1999 rem *****************************
2000 _scrmem0
2001 _cfree:bc=32:_decodbc:_tmask0,1:_tmask0,2:_smask1,bc:_smask2,bc
2002 _at18,25:print"[159]n l s $ e x":_at18,25
2010 _sprset5,18,mp(m):_stop:a=peek(2):gosub2100:ifa<>13then2010
2011 poke199,0:ifm=0 thenprint"[159] new room? ":gosub2600:ifsi=74then:_npro:_fout
2012 ifm=1 thenprint"[159] load room ":m1=1:gosub2200:ifsi=74then:_load:gosub5000
2013 ifm=2 thenprint"[159] save room ":m1=-1:gosub2200:ifsi=74then:_save:gosub5000
2014 ifm=3 thenprint"[159] directory ":poke56047,15:gosub2051:_fout:goto2000
2015 ifm=4 then:_hbcy0,x0:bc=peek(2):br=bc:_decodbr:_tmask0,1:_tmask0,2
2016 ifm=4then:_smask1,bc:_smask2,br:_at18,24:print" [158]m[159]enue [155]"
2017 ifm=4 then:_sprset5,2,41:return
2018 ifm=5 thenprint"[159] exit? ":gosub2600:ifsi<>74then2001
2020 ifm=5 thenpoke36357,peek(53280):_ovic:end
2021 goto2001
2050 rem * dirbefehlslaenge
2051 _at24,24:print"a[155]ll or s[155]pecial?";:_sprset5,24,39:_stop
2052 a=peek(2):if a=65then dl=1 :goto 2056
2053 if a=83then dl=18:goto 2056
2054 if a=13then goto2056
2055 goto2051
2056 _dirdl:gosub2602:return
2100 ifa=157then m=m-1:ifm=-1then m=0
2101 ifa=29 then m=m+1:ifm=6 then m=5
2103 mp=mt(m):return
2200 rem * filenane eingeben $9070
2201 y5=20:ta=0:
2202 x5=25+ta:_sprset5,y5,x5:_stop:a=peek(2)
2203 if a=157thenta=ta-1:ifta=-1thenta=0
2204 if a=29thenta=ta+1:ifta=13thenta=12
2206 if a=13then:_sprset5,0,41:goto2212
2208 if a<32ora>95then2202
2210 _aty5,x5:print"[155]";:printchr$(a):poke36976+ta,a:a=29:goto2204
2212 _at22,24:print"[155].lo .sr .ok .v[155]":poke56214,15:poke35734,v
2299 rem * praefix waehlen
2300 if m1=1 and p<2thenp=2
2301 _sprset5,22,24+4*p:_stop:a=peek(2)
2302 if a=157thenp=p-1:ifp=m1thenp=m1+1
2304 if a=29thenp=p+1:ifp=4thenp=3
2306 if a=13then 2400
2308 goto 2300
2400 rem * evtl versions nummer holen
2401 _at22,24:print"[151].lo .sr .ok .v[155]":poke56214,11
2402 forx=0to3:poke56199+4*p+x,15:nextx
2404 if p<>3then2420
2406 _sprset5,22,38:_stop:a=peek(2):ifa=13then2420
2408 if a<48 or a>57 then2406
2412 v=a:poke35734,a:poke36848,a:goto2406
2420 rem * praefix anfhaengen
2421 if p=0then poke36976+13,46:poke36976+14,76:poke36976+15,79:si=0:goto7000
2422 if p=1then goto 5030: rem screach
2423 if p=2then poke36976+13,46:poke36976+14,79:poke36976+15,75
2424 if p=3then poke36976+13,46:poke36976+14,86:poke36976+15,v
2502 if p=3then poke35734,v:poke56214,15
2600 rem *** sicherheitsabfrage
2601 _at24,24:print" are you sure?[159] ";:_sprset5,24,38:_stop:si=peek(2)
2602 if si=89thensi=74
2603 _sprset5,24,41:_at24,24:print"[159] (p) by sysart [155]";:return
5000 rem *** fehlerkanal einlesen ***
5001 f1=peek(36352):_floppy:o=peek(2):ifo=0then:_farbset:return
5010 if o=67then:_at24,24:print"write protect !";:goto5025
5012 if o=62then:_at24,24:print"file not found!";:goto5025
5014 if o=63then:_at24,24:print" file exist! ";:goto5025
5016 if o=72then:_at24,24:print" disc full! ";:goto5025
5018 if o=74then:_at24,24:print"drive not ready";:goto5025
5019 _farbset:return
5025 _sprset5,24,39:_stop:_sprset5,1,41:_at24,24:print"[159] (p) by sysart [155]";
5027 _farbset:return
5030 rem *** scratch a file ***
5033 _at18,25:print"[159]scratch file!":_at24,24:print"a[155]ll or s[155]pecial?";
5034 _sprset5,24,39:_stop:a=peek(2)
5035 if a=65 then 5050: rem alle
5037 if a=83 then 5041: rem einzel
5038 _at24,24:print"[159] (p) by sysart ";:si=0:return
5041 _at18,25:print"[159]scratch file ";:_at24,24:print"[155]version-number?";
5042 _sprset5,22,38:_stop:a=peek(2):ifa=13then5048:rem versionsnummer holen
5044 if a<48 or a>57 then 5042
5046 v=a:poke35734,a:goto5042
5048 poke36976-2,83:poke36975,58:poke36976+13,46:poke36976+14,86:poke36976+15,v
5049 goto5061:rem->einzel scratch
5050 rem **** loesche alle files
5052 _at18,25:print"[159]load .ok file";
5053 poke36976+13,46:poke36976+14,79:poke36976+15,75:_load:_floppy:o=peek(2)
5054 ifo=0then5057:->.ok file gefunden
5055 _at24,24:print"miss .ok file !";:_sprset5,24,39:_stop
5056 _at24,24:print"[159] (p) by sysart [155]";:si=0:return
5057 _farbset:_at24,24:print"so good? (j/n) [155]";:_sprset5,24,38:_stop:a=peek(2)
5058 ifa<>74then5056
5059 poke36976-2,83:poke36975,58:poke36976+13,46:poke36976+14,86:poke36976+15,42
5060 _at18,25:print"[159] scratch all [155]"
5061 gosub2600:ifsi<>74then si=0:return
5062 si=0:_scratch:return
6000 rem *** hilfsseiten ***
6001 _scrmem0:poke53269,0:poke36352,0
6005 _at0,0:print"[159] tastaturbelegung im chareditor "
6006 _at1,0:print"-------------------------------- "
6007 _at2,0:print"[158]f1 f3 f5 f7 [159]zeichenfarbe auswaehlen. "
6008 _at3,0:print"[158]f2 [159]back. [158]f4 [159]multi1 [158]f6 [159]multi2 [158]f8 [159]rand "
6009 _at4,0:print"[158]1-8 [159]individualfarbe, wie es drauf steht."
6010 _at5,0:print"[158]return [159]setze punkt [158]* [159]das zei. blinkt "
6011 _at6,0:print" "
6012 _at7,0:print"[158] _ [159]undo [158]space [159]zurueck zum raumeditor "
6013 _at8,0:print"[158]clr [159]fuellt das ges. zei. mit akt. farbe "
6014 _at9,0:print"[158] ^ [159]fuellt cursorspalte mit akt. farbe "
6015 _at10,0:print"[158] = [159]fuellt cursorzeile mit akt. farbe "
6016 _at11,0:print"[158] + [159]spiegeln an der y-achse [158]\ [159]tausche "
6017 _at12,0:print"[158] - [159]spiegeln an der x-achse [159]2 farben "
6018 _at13,0:print"[158] o [159]rotiert das zeichen nach oben "
6019 _at14,0:print"[158] l [159]rotiert das zeichen nach links "
6020 _stop:gosub7500:_stop:poke53269,255:poke36352,f1:_memscr0:_farbset:return
6029 rem **** hilfsseiten fuer oben ***
6030 _scrmem0:_at0,0:print"[159] tastaturbelegung im raumeditor "
6031 poke53269,0:_at1,0:print"-------------------------------- "
6032 _at2,0:print"[158]f2 [159]back. [158]f4 [159]multi1 [158]f6 [159]multi2 [158]f8 [159]rand "
6033 _at3,0:print"[158]1-8 [159]individualfarbe, wie es drauf steht."
6034 _at4,0:print"[158]return [159]set zei [158]= [159]ret.& rechts [158]^ [159]ret.&^"
6035 _at5,0:print"[158]shift return [159]set zei. mit neuem bildcode"
6036 _at6,0:print"[158]home [159]loesche das zei. an akt. cursorpos."
6037 _at7,0:print"[158]clr [159]wie -home- & rechts [158]inst [159]-home- & ^"
6038 _at8,0:print"[158] a [159]blockecke oben links [158]c [159]copy block "
6039 _at9,0:print"[158] b [159]blockecke unten rechts [158]f [159]fill block "
6040 _at10,0:print"[158] _ [159]undo [158]space [159]edidiere das zeichen "
6041 _at11,0:print"[158] m [159]go to menue [158]* [159]gleiche zei. blinken"
6042 _at12,0:print"[158] 9 [159]bzw [158]0 [159]lege bild in memory 1 bzw 2 "
6043 _at13,0:print"[158]control 9/0 [159]hole bild aus memory 1 bzw 2"
6044 _at14,0:print" "
6046 _stop:poke53269,255:poke36352,f1:_memscr0:_farbset:return
7000 rem *** creat loader ***
7001 _at18,25:print"[159]create loader":ll=36608
7010 _at24,24:print"[155]charbasis [158]$0000";:_sprset5,24,35:_zahl
7012 zh=peek(163):pokell+58,zh+8:pokell+42,zh+2
7020 _at24,24:print"[155]screenbas [158]$0000";:_sprset5,24,35:_zahl
7022 zh=peek(163):pokell+68,zh:pokell+88,zh+2
7030 _at24,24:print"[155]colortab. [158]$0000";:_sprset5,24,35:_zahl
7032 zh=peek(163):pokell+5,zh:pokell+33,zh:pokell+102,zh:pokell+108,zh
7033 pokell+114,zh
7040 gosub2600:ifsi=74then:_lsave
7050 si=0:return
7499 rem * zweite hilfsseite fuer unten
7500 _at0,0:print"[158]ein paar worte zur internen zeichensatz-"
7501 _at1,0:print"verwaltung. [159]diese kann in zwei modi ar- "
7502 _at2,0:print"beiten. steht in der mitte [158]on[159], so werden"
7503 _at3,0:print"alle zeichen die offensichtlich nicht "
7504 _at4,0:print"mehr gebraucht werden, automatisch ge- "
7505 _at5,0:print"loescht und zum neubeschreiben freigege-"
7506 _at6,0:print"ben. wenn in der mitte [158]--[159] steht ist die-"
7507 _at7,0:print"se funktion ausgeschaltet. die zeichen "
7508 _at8,0:print"sind zwar nicht mehr im bild zu sehen, "
7509 _at9,0:print"aber im zeichensatz noch voll vorhanden."
7510 _at10,0:print"mit [158]c= & m [159]schaltet man die modi um. "
7511 _at11,0:print"mit [158],[159]/[158].[159] blaettert man im zeichensatz. "
7512 _at12,0:print"mit [158]<[159]/[158]>[159] gehts auch in zehnerschritten. "
7513 _at13,0:print"mit [158]f[159] setzt man zei. manuell frei, wenn "
7514 _at14,0:print"sie nicht mehr im bild gebraucht werden.":return